package com.example.helloworld;

import java.util.Scanner;

/**
 * ClassName: UserInterface
 * Package: com.example.helloworld
 * Description:
 *
 * @Author guotingting
 * @Create 2025/4/21 4:42 PM
 * @Version 1.0
 */
public class UserInterface {
    public static void main(String[] args) {
        User u1 = new User();
        u1.name = "Tom";
        u1.password = "123456";

        Scanner scanner = new Scanner(System.in);
        System.out.print("Please input your name: ");
        String name = scanner.next();
        System.out.print("Please input your password: ");
        String password = scanner.next();

        boolean isLogin = u1.login(name, password);
        if (isLogin) {
            System.out.println("Login success!");
        } else {
            System.out.println("Login failed!");
        }
    }
}
